import {
  getManagementList as getManagementListApi,
  createManagement as createManagementApi,
  updateManagement as updateManagementApi,
  getManagementDetail as getManagementDetailApi,
  report as reportApi,
  batchUpdate as batchUpdatetApi,
  start as startApi,
} from "@/api";

export const getManagementList = (data) => {
  return getManagementListApi(data);
};

export const createManagement = (data) => {
  return createManagementApi({ ...data, state: data.state ? 1 : 0 });
};

export const updateManagement = (data) => {
  return updateManagementApi({ ...data, state: data.state ? 1 : 0 });
};

export const batchUpdate = (data) => {
  return batchUpdatetApi({ ...data, state: data.state ? 1 : 0 });
};

export const getManagementDetail = (data) => {
  return getManagementDetailApi(data);
};

export const report = () => {
  return reportApi();
};

export const start=(data) => {
  return startApi(data);
}
